/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package edu.infomatik.tundra.logic;


import java.util.Date;

import edu.infomatik.tundra.data.ILogicBean;
import edu.infomatik.tundra.logic.WorkKinds;
import edu.infomatik.tundra.util.TundraConstants;


/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Work</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getId <em>Id</em>}</li>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getName <em>Name</em>}</li>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getKind <em>Kind</em>}</li>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getIdealSP <em>Ideal SP</em>}</li>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getEstSP <em>Est SP</em>}</li>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getDateCreated <em>Date Created</em>}</li>
 *   <li>{@link edu.infomatik.tundra.logic.impl.WorkImpl#getScheduleDate <em>Schedule Date</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class WorkBean  implements ILogicBean{
	private final WorkKinds DEFAULT_KIND = WorkKinds.PROJECT;
	private long id;
	private String name;
	private WorkKinds kind = DEFAULT_KIND;
	private double idealSP;
	private double estSP;
	private Date dateCreated;
	private Date scheduleDate;
	private Date deadline;
	private boolean inProgress;
	private boolean fullEntered;
	private long projectId;

	public WorkBean() {
		super();
		setKind(WorkKinds.PROJECT);
	}

	public long getProjectId() {
		return projectId;
	}

	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}

	public long getId() {
		return id;
	}

	public void setId(long newId) {
		id = newId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public short getKind() {
		return (short)this.kind.getValue();
	}

	public void setKind(short kind) {
		if (null == (this.kind=WorkKinds.get(kind)))
			this.kind=WorkKinds.OTHER;
	}

	public void setKind(WorkKinds kind) {
			this.kind=kind;
	}

	public double getIdealSP() {
		return idealSP;
	}

	public void setIdealSP(double idealSP) {
		this.idealSP = idealSP;
	}

	public double getEstSP() {
		return estSP;
	}

	public void setEstSP(double estSP) {
		this.estSP = estSP;
	}

	public Date getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}

	public Date getScheduleDate() {
		return scheduleDate;
	}

	public void setScheduleDate(Date scheduleDate) {
		this.scheduleDate = scheduleDate;
	}

	public Date getDeadline() {
		return deadline;
	}

	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}

	public boolean isInProgress() {
		return inProgress;
	}

	public void setInProgress(boolean inProgress) {
		this.inProgress = inProgress;
	}

	public boolean isFullEntered() {
		return fullEntered;
	}

	public void setFullEntered(boolean fullEntered) {
		this.fullEntered = fullEntered;
	}
	
	@Override
	public short getClassId() {
		return TundraConstants.WORK_CLASS;
	}
}